package com.example.toolproject.demo.service.serviceimpl;

import com.example.toolproject.demo.domain.ScenicArea;
import com.example.toolproject.demo.mapper.ScenicAreaMapper;
import com.example.toolproject.demo.service.ScenicAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ScenicAreaServiceImpl
 * @Description TODO
 * @Author lvyongwei
 * @Date 2020-06-19 10:45
 **/
@Service
public class ScenicAreaServiceImpl implements ScenicAreaService {

    @Autowired
    private ScenicAreaMapper scenicAreaMapper;

    /**
     * 獲取所有景區信息
     * @return
     */
    @Override
    public List<ScenicArea> getAllScenicArea() {
        return scenicAreaMapper.getAllScenicArea();
    }

    /**
     * 根据搜索条件查询景区信息
     * @param searchMessage   搜索条件
     * @return
     */
    @Override
    public List<ScenicArea> getScenicAreaBySearchMessage(String searchMessage) {
        return scenicAreaMapper.getScenicAreaBySearchMessage(searchMessage);
    }

    /**
     * 添加景区信息
     * @param scenicArea
     * @return
     */
    @Override
    public boolean insertScenicArea(ScenicArea scenicArea) {
        return scenicAreaMapper.insertScenicArea(scenicArea);
    }


}
